<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<script type="text/javascript">
    var devices_data = [
        {id: 1, name: "手表"},
        {id: 2, name: "手环1"},
        {id: 3, name: "手环2"},
        {id: 4, name: "智能卡"},
        {id: 5, name: "人员卡"}
    ];
    var devices_state=[
        {id: 1, name: "正常"},
        {id: 2, name: "报废"},
        {id: 3, name: "维修"},
        {id: 4, name: "带离"}
    ];
    function getDeviceTypeName(deviceType) {
        for (var i = 0; i < devices_data.length; i++) {
            if (deviceType == devices_data[i].id) {
                return devices_data[i].name;
            }
        }
        return '未知设备';
    }
    function getDeviceStateName(deviceState) {
        for (var i = 0; i < devices_state.length; i++) {
            if (deviceState == devices_state[i].id) {
                return devices_state[i].name;
            }
        }
        return '未知状态';
    }
</script>